The Synchronize Database to Model feature allows you to compare a database or schema with an existing model, states the differences between their structures, and offers synchronizing modifications in the database or schema into the model.
Navicat Data Modeler provides a step-by-step wizard for you to complete the task:
In the Workspace window, choose Tools -> Reverse Engineering -> Synchronize Database to Model.
Select the source connection, database, schema, and select the target model, database, schema.
Click Options and select the compare / advanced options.
Click Compare to show the differences between source and target objects.
Select the objects you want to synchronize.
Click Next to execute the process.
The first step is to define the source connection and the target model.
Then, click the Options button to select the compare / advanced options for the synchronization process.
Note: The following options depend on the diagram database type you are chosen and sort in ascending order.
Option |
Description |
Compare auto increment value |
Compare the auto increment values of tables. |
Compare character set |
Compare the character sets of tables. |
Compare checks |
Compare check constraints. |
Compare collation |
Compare the collations of tables. |
Compare definers |
Compare the definers of views. |
Compare excludes |
Compare exclusion constraints. |
Compare foreign keys |
Compare the foreign keys of tables. |
Compare functions |
Compare function and procedure objects. |
Compare identity last value |
Compare the identity last values of tables. |
Compare indexes |
Compare table indexes. |
Compare owners |
Compare the owners of database objects. |
Compare partitions |
Compare table partitions. |
Compare primary keys |
Compare the primary keys of tables. |
Compare rules |
Compare rule objects. |
Compare sequences |
Compare sequence objects. |
Compare sequence last values |
Compare the last values of sequences. |
Compare storage |
Compare table storages. |
Compare table options |
Compare other table options. |
Compare tables |
Compare table objects. |
Compare triggers |
Compare table triggers. |
Compare uniques |
Compare unique constraints. |
Compare views |
Compare view objects. |
Drop with CASCADE |
Drop the dependent database objects with the CASCADE option. |
Identifier Case Sensitivity |
Ignore or consider the case of identifiers when mapping, or use the server default setting. |
Click the Compare button to compare the source database and the target model.
After comparing structures, the tree view shows the differences between the source and target databases or schemas. Check the objects you want to apply to the target. You can expand the objects to view the detailed structure.
You can choose to group the objects in the tree views by object types or operations by selecting Group by Object Type or Group by Operation.
Operation |
Description |
|
Object exists in both source and target databases/schemas, but they have different definition. The target object will be modified based on the source object. |
|
Object does not exist in the target database/schema. It will be created in the target. |
|
Object does not exist in the source database/schema. The target object will be deleted. |
|
Object exists in both source and target databases/schemas and they have identical definition. No operation will be applied. |
When you select an object from the comparison results, the DDL Comparison tab displays the statements for that object from both the source database and the target model side by side. Any differences in the statements, such as added, modified, or removed fields, are highlighted for quick identification.
Furthermore, the Deployment Script tab shows the specific scripts of the object that will be updated in the target model.
Click the Next button to execute the process. The window will display the execution progress, execution time, and success or failure messages.